package com.itjiange;

/**
 * 没有投放钱币的状态
 *
 * @author ItJianGe
 * @data 2024/8/20 17:18
 */
public class NoCoinStatus implements Status {

    private GumballMachine gumballMachine;

    public NoCoinStatus(GumballMachine gumballMachine) {
        this.gumballMachine = gumballMachine;
    }

    @Override
    public void insertCoin() {
        System.out.println("投入钱币成功");
        gumballMachine.setStatus(gumballMachine.getHasCoinStatus());
    }

    @Override
    public void undoCoin() {
        System.out.println("目前没有投币，不能退回钱币");
    }

    @Override
    public void turnCrank() {
        System.out.println("目前没有投币，不能转动曲柄");
    }

    @Override
    public void dispense() {
        System.out.println("目前没有投币，不能发放口香糖");
    }
}
